﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//
using ddcCajamarca.BusinessEntities.Directorio;

namespace ddcCajamarca.BusinessEntities.AgendaCultural
{
    public partial class DetalleEvento:IEquatable<DetalleEvento>
    {
        //solo para genrar la base de datos
        //public Int32 Id { get; set; }
        public decimal Aporte { get; set; }
        public string Otros { get; set; }
        public string Tipo { get; set; }

        public virtual Organizacion Organizacion { get; set; }
        public int OrganizacionId { get; set; }

        public virtual Evento Evento { get; set; }
        public int EventId { get; set; }

        public bool Equals(DetalleEvento other)
        {
            if (object.ReferenceEquals(other, null)) return false;
            if (object.ReferenceEquals(this, other)) return true;

            return OrganizacionId.Equals(other.OrganizacionId) && EventId.Equals(other.EventId);
        }

        public override int GetHashCode()
        {
            return EventId.GetHashCode() * OrganizacionId.GetHashCode();
        }

    }
}
